package com.stdspringboot.ctrl;

import com.stdspringboot.service.ITransferService;
import com.stdspringboot.vo.JsonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.FileNotFoundException;

@RestController
public class TransferCtrl {
    /**
     * 首先根据名字注入
     * 如果找不到，就根据类型注入
     */
    @Resource
    private ITransferService service;

    @RequestMapping("/transfer")
    public JsonResult transfer(){

        try {
            service.transfer();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }


        return null;
    }
}
